import request from '@/utils/request'

// 查询对应索引信息列表
export function listIndexed(query) {
  return request({
    url: '/reportworld/indexed/list',
    method: 'get',
    params: query
  })
}

// 查询对应索引信息详细
export function getIndexed(data) {
  return request({
    url: '/reportworld/indexed/getIndexed',
    method: 'post',
    data: data
  })
}

// 新增对应索引信息
export function addIndexed(data) {
  return request({
    url: '/reportworld/indexed',
    method: 'post',
    data: data
  })
}

// 修改对应索引信息
export function updateIndexed(data) {
  return request({
    url: '/reportworld/indexed',
    method: 'put',
    data: data
  })
}

// 删除对应索引信息
export function delIndexed(idList, hisVersion) {
  const data = {
    idList,
    hisVersion
  };
  return request({
    url: '/reportworld/indexed/remove',
    method: 'post',
    data: data
  })
}

// 初始化查询
export function init(data) {
  return request({
    url: '/reportworld/indexed/init/',
    method: 'post',
    data: data
  })
}
